package org.omg.RTCORBA;

/**
 * Generated from IDL definition of alias "ThreadpoolLanes"
 * 
 * @author orbas IDL compiler
 */

public final class ThreadpoolLanesHelper {
	private static org.omg.CORBA.TypeCode _type = null;

	public static void insert(org.omg.CORBA.Any any,
			org.omg.RTCORBA.ThreadpoolLane[] s) {
		org.omg.CORBA.portable.OutputStream out = any.create_output_stream();
		any.type(type());
		write(out, s);
		any.read_value(out.create_input_stream(), type());
	}

	public static org.omg.RTCORBA.ThreadpoolLane[] extract(
			final org.omg.CORBA.Any any) {
		return read(any.create_input_stream());
	}

	public static org.omg.CORBA.TypeCode type() {
		if (_type == null) {
			_type = org.omg.CORBA.ORB.init().create_alias_tc(
					org.omg.RTCORBA.ThreadpoolLanesHelper.id(),
					"ThreadpoolLanes",
					org.omg.CORBA.ORB.init().create_sequence_tc(0,
							org.omg.RTCORBA.ThreadpoolLaneHelper.type()));
		}
		return _type;
	}

	public static String id() {
		return "IDL:org/omg/RTCORBA/ThreadpoolLanes:1.0";
	}

	public static org.omg.RTCORBA.ThreadpoolLane[] read(
			final org.omg.CORBA.portable.InputStream _in) {
		org.omg.RTCORBA.ThreadpoolLane[] _result;
		int _l_result0 = _in.read_long();
		_result = new org.omg.RTCORBA.ThreadpoolLane[_l_result0];
		for (int i = 0; i < _result.length; i++) {
			_result[i] = org.omg.RTCORBA.ThreadpoolLaneHelper.read(_in);
		}

		return _result;
	}

	public static void write(final org.omg.CORBA.portable.OutputStream _out,
			org.omg.RTCORBA.ThreadpoolLane[] _s) {

		_out.write_long(_s.length);
		for (int i = 0; i < _s.length; i++) {
			org.omg.RTCORBA.ThreadpoolLaneHelper.write(_out, _s[i]);
		}

	}
}
